home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / utility / ffe101.zip / GRAPH.SWG / 0020_RIFF.pas < prev    next >
Pascal/Delphi Source File  |  1996-09-04  |  3KB  |  58 lines

  1. --------f-RIFF------------------------------
  2.  
  3. The  RIFF  (Resource  interchange  file  format)  format  was created by
  4. Microsoft  and  is  used by many  applications  like Windows, Corel Draw
  5. etc..  It is block structured, each block has a header ID and a size, so
  6. that  even  a program that works with  an old version of the file format
  7. can  skip  the unknown parts of the file  and work on the known parts of
  8. the  file.  All  RIFF  blocks begin on  a  word  boundary so it might be
  9. necessary to skip an additional byte. In the present specification, only
  10. one  RIFF  block per file is allowed,  and only the RIFF and LIST blocks
  11. may contain subblocks.
  12.  
  13. The  order  of  blocks in a RIFF  file  is  not mandatory, so you should
  14. always  scan  the whole file for the  block ID you seek. Throughout this
  15. file,  the  RIFF block IDs are given  in  square brackets []. Each ID is
  16. always 4 characters dword.
  17.  
  18. OFFSET              Count TYPE   Description
  19. 0000h                   4 char   ID='RIFF'
  20.                                  Each RIFF format file has a header with the
  21.                                  signature and the size of the following
  22.                                  blocks.
  23. 0004h                   1 dword  Block size. This size is the size of the block
  24.                                  controlled by the RIFF header. Normally this
  25.                                  equals the file size.
  26.                                  ="BSZ"
  27. 0008h                   4 char   Format name. This is the format name of the RIFF
  28.                                  file.
  29. After this RIFF header comes the first RIFF record. Each RIFF record has the
  30. following format :
  31. OFFSET              Count TYPE   Description
  32. 0000h                   4 char   Signature. This is the description of what is
  33.                                  contained in this block.
  34. 0004h                   1 dword  Block size. This is the size of the following
  35.                                  data block. To get the offset of the next RIFF
  36.                                  block record, you have to add this value + 8 to
  37.                                  the offset of the current record.
  38.  
  39. ---RiffBLOCK [LIST]
  40.  
  41. This  block  contains a string list,  again in the RIFF subblock format.
  42. This list is used for messages and/or copyright messages. All strings in
  43. the  LIST  block share the same  format,  each block contains one ASCIIZ
  44. string  -  the  most common LIST block  is  the  [INFO] block, which can
  45. contain the following subblocks :
  46.  
  47. [INAM]
  48. The name of the data stored in the file
  49. [ICRD]
  50. Creation date of the file
  51.  
  52. SEE ALSO:BMP,rDIB,IFF,WAVe,RIFX
  53. OCCURENCES:PC
  54. PROGRAMS:Windows,Corel Draw
  55. REFERENCE:DDJ0994
  56. VALIDATION:FileSize="BSZ"+8
  57.  
  58.